Fix 2 Krazy issues with modal dialog

wilder-portage
Jekyll Wu 15 years ago
parent 125e2c7bd2
commit 82ef9ccd3a
  1. 9
      src/ManageProfilesDialog.cpp
  2. 5
      src/SessionController.cpp

@ -351,8 +351,6 @@ void ManageProfilesDialog::moveDownSelected()
void ManageProfilesDialog::createProfile()
{
EditProfileDialog dialog(this);
// setup a temporary profile which is a clone of the selected profile
// or the default if no profile is selected
Profile::Ptr sourceProfile;
@ -370,10 +368,11 @@ void ManageProfilesDialog::createProfile()
newProfile->setProperty(Profile::Name, i18nc("@item This will be used as part of the file name", "New Profile"));
newProfile->setProperty(Profile::MenuIndex, QString("0"));
dialog.setProfile(newProfile);
dialog.selectProfileName();
QPointer<EditProfileDialog> dialog = new EditProfileDialog(this);
dialog->setProfile(newProfile);
dialog->selectProfileName();
if ( dialog.exec() == QDialog::Accepted )
if ( dialog->exec() == QDialog::Accepted )
{
SessionManager::instance()->addProfile(newProfile);
SessionManager::instance()->setFavorite(newProfile,true);

@ -785,7 +785,7 @@ void SessionController::copyInputToSelectedTabs()
_copyToGroup->setMasterMode(SessionGroup::CopyInputToAll);
}
CopyInputDialog* dialog = new CopyInputDialog(_view);
QPointer<CopyInputDialog> dialog = new CopyInputDialog(_view);
dialog->setMasterSession(_session);
QSet<Session*> currentGroup = QSet<Session*>::fromList(_copyToGroup->sessions());
@ -798,7 +798,7 @@ void SessionController::copyInputToSelectedTabs()
if (!guard)
return;
if (result)
if ( result == QDialog::Accepted )
{
QSet<Session*> newGroup = dialog->chosenSessions();
newGroup.remove(_session);
@ -817,7 +817,6 @@ void SessionController::copyInputToSelectedTabs()
snapshot();
}
delete dialog;
_copyToAllTabsAction->setChecked(false);
_copyToSelectedAction->setChecked(true);
_copyToNoneAction->setChecked(false);

Loading…
Cancel
Save