Commit 7cfa939c authored by Jan Möbius's avatar Jan Möbius
Browse files

Set active examiner when getting context menu

Add slots for copy and save view in core working with multiple examiner widgets

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@4292 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 5d720cb3
......@@ -68,6 +68,8 @@ void CoreWidget::slotCustomContextMenu( const QPoint& _point ) {
}
PluginFunctions::setActiveExaminer( examinerId );
updatePopupMenu(_point,examinerId);
// If not initialized, dont show it!!
......@@ -234,13 +236,13 @@ void CoreWidget::updatePopupMenu(const QPoint& _point, unsigned int _examinerId)
action = functionMenu->addAction("Copy View");
action->setToolTip("Copy current view to clipboard");
connect(action, SIGNAL(triggered()), examiner_widget_, SLOT(actionCopyView()) );
connect(action, SIGNAL(triggered()), this, SLOT(slotCopyView()) );
//====================================================================================================
action = functionMenu->addAction("Paste View");
action->setToolTip("Paste current view from clipboard");
connect(action, SIGNAL(triggered()), examiner_widget_, SLOT(actionPasteView()) );
connect(action, SIGNAL(triggered()), this , SLOT( slotPasteView( ) ) );
//====================================================================================================
......@@ -316,6 +318,15 @@ void CoreWidget::changeBackgroundColor(){
}
}
void CoreWidget::slotPasteView( ) {
examiner_widgets_[PluginFunctions::activeExaminer()]->actionPasteView();
}
void CoreWidget::slotCopyView( ) {
std::cerr << "Copy View" << PluginFunctions::activeExaminer() << std::endl;
examiner_widgets_[PluginFunctions::activeExaminer()]->actionCopyView();
}
void CoreWidget::updateGlobalOptions(bool /*_enable*/){
OpenFlipper::Options::synchronization( examiner_widget_->synchronization() );
OpenFlipper::Options::animation( examiner_widget_->animation() );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment