Commit 8654b0f9 authored by Jan Möbius's avatar Jan Möbius

Cleaner menu handling for picking context menu

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@11562 383ad7c9-94d9-4d36-a494-682f7c89f535
parent c6ebe364
......@@ -175,12 +175,13 @@ void CoreWidget::getPickMode(std::string& _mode){
void CoreWidget::updatePickMenu()
{
if (pickMenu_ != 0)
delete pickMenu_;
pickMenu_ = new QMenu( 0 );
connect( pickMenu_, SIGNAL( aboutToHide() ),
this, SLOT( hidePopupMenus() ) );
if (pickMenu_ != 0) {
pickMenu_->clear();
} else {
pickMenu_ = new QMenu( 0 );
connect( pickMenu_, SIGNAL( aboutToHide() ),
this, SLOT( hidePopupMenus() ) );
}
QActionGroup * ag = new QActionGroup( pickMenu_ );
ag->setExclusive( true );
......
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