Changes in maindialog.cpp