SHARE
TWEET

Untitled

a guest Aug 25th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. diff --git a/propertieswidget.cpp b/propertieswidget.cpp
  2. index 614d952..34fc985 100644
  3. --- a/propertieswidget.cpp
  4. +++ b/propertieswidget.cpp
  5. @@ -140,10 +140,22 @@ void PropertiesWidget::pickTechnique()
  6.      String projectFolder{ weaver->projectLocation() };
  7.      String urhoFolder{ weaver->urhoFolder() };
  8.  
  9. +    QString searchFolder;
  10. +
  11. +    if (projectFolder.Empty()) {
  12. +        QDir directory(toQString(urhoFolder));
  13. +        bool worked = directory.cd("bin/CoreData/Techniques");
  14. +        if (!worked)
  15. +            QMessageBox::warning(this, "Pick Technique", "Techniques Urho3D folder not found");
  16. +        searchFolder = directory.absolutePath();
  17. +    } else {
  18. +        searchFolder = toQString(projectFolder);
  19. +    }
  20. +
  21.      QString xmlFilter{ tr("*.xml") };
  22.      String techniqueFileName{
  23.          toString(QFileDialog::getOpenFileName(this, tr("Pick Technique"),
  24. -                                              toQString(projectFolder.Empty() ? urhoFolder : projectFolder),
  25. +                                              searchFolder,
  26.                                                xmlFilter, &xmlFilter)) };
  27.  
  28.      if (techniqueFileName.Empty()) {
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top